package com.jsu.clubmanagementsystem.controller.club;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsu.clubmanagementsystem.common.BaseResponse;
import com.jsu.clubmanagementsystem.common.PageRequest;
import com.jsu.clubmanagementsystem.common.ResultUtils;
import com.jsu.clubmanagementsystem.model.vo.club.ListMemberVO;
import com.jsu.clubmanagementsystem.service.club.ClubMembershipService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member")
public class ClubMemberController {

    @Resource
    private ClubMembershipService membershipService;

    @PostMapping("/list/all")
    public BaseResponse<Page<ListMemberVO>> getAllMembers(@RequestBody PageRequest pageRequest){
        return ResultUtils.success(membershipService.getListMemberVO(pageRequest));
    }
}
